home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 22
/
Aminet 22 (1997)(GTI - Schatztruhe)[!][Dec 1997].iso
/
Aminet
/
dev
/
cross
/
c64_ass_v1_0.lha
/
C64_ass_V1.0
/
Syntax
< prev
Wrap
Text File
|
1997-08-23
|
3KB
|
91 lines
/* Syntax for the OEJ6510-assembler by Oyvind Jergan 1997
*
* - {a, b, c} indicates set
* - U indicates union of sets
* - [a b c ...] indicates sequence of symbols a b c ...
* - All symbols can be separated by white caracters
* - Only words starting with capital letters are domains
*/
Program = [Line Line ... Line]
Line = EOF
| EOL
| [; Comment EOL]
| [/ * Comment * / Line]
| [# Assdir Line]
| [Variable Line]
| [Variable: Line]
| [Variable = Exp Line]
| [* = Exp Line]
| [Instr Instr-mode Line]
| [Data Line]
Comment = String
Variable = String
Assdir = [set Setting]
| [option Option]
Setting = s_loadaddress ; default is the clc of the first byte in file
Option = o_use_pet_ascii ; use pet_ascii instead of ascii
| o_casesens ; case-sensitive variable-match
| o_show_var_def ; show variables as they are defined | o_show_var_ref ; list variables with number of references
| o_show_var_ref ; list variables with number of references
| o_show_instr_ref ; list instructions with number of references
| o_show_instr_all ; list all legal instructions (with number of r.)
| o_show_output ; show the output from assembler
| o_show_errorline ; show the line where an error occurs
| o_show_1_e_on_line ; show only one error at each line
; for all options: 1 = true, 0 = false (default false)
Instr-mode = EOL ; implied
| a ; accumulator
| [# Exp] ; immidiate
| Exp ; zeropage | absolute | relative
| [Exp , x] ; zeropage,x | absolute,x
| [Exp , y] ; zeropage,y | absolute,y
| [( Exp )] ; indirect
| [( Exp , x )] ; indirect,x
| [( Exp ) , y] ; indirect,y
Data | [.bytes Exp] ; assemble Exp number of .byte 0
| [.byte Exp ... Exp] ; 0 < Exp < 256
| [.word Exp ... Exp] ; 0 < Exp < 65536
| [.text " Ascii ... Ascii "]
Exp = Decnr
| Hexnr
| Binnr
| [" Ascii "]
| [+ Exp]
| [- Exp]
| [Exp + Exp]
| [Exp - Exp]
| [Exp * Exp]
| [Exp / Exp]
| [ < Exp] ; lowbyte
| [ > Exp] ; highbyte
| * ; current location pointer
| [( Exp )]
Decnr = [Ds ... Ds]
Hexnr = [$ Hs ... Hs]
Binnr = [% Bs ... Bs]
String = [Al Ds ... Ds]
Ds member of DS = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9}
Hs member of HS = DS U { a, b, c, d, e, f, A, B, C, D, E, F}
Bs member of BS = {0, 1}
Al member of AL = {a, b, ..., z} U {A, B, ..., Z} U {_}
Ascii member of {ascii caracters}
EOL = Cr ; $0a
EOF = EndOfFile ; last byte of source read
White = Space
| Tab
| Linefeed ; $0d